import socket
sk=socket.socket(type=socket.SOCK_DGRAM)
ip_port=('127.0.0.1',8080)
while True:
    c_msg=input('client>>>').encode('utf-8')
    sk.sendto(c_msg,ip_port)
    msg,addr=sk.recvfrom(1024)
    print(f'{addr}>>>{msg.decode("utf-8")}')
    if msg.decode('utf-8')=='bye':
        sk.sendto(b'bye',ip_port)
        break

sk.close()
